#pragma once
#ifndef CGenomeInBits_H_
#define CGenomeInBits_H_

#include "SeqInBits.h"
#include "chromosomeNTdata.h"
#include "GenomeNTdata.h"
#include "stdafx.h"

class CGenomeInBits :  public CSeqInBits
{
public:
    CGenomeInBits(unsigned int uiGenomeSize = 0);
    CGenomeInBits(CGenomeNTdata* pGenome);
    ~CGenomeInBits(void);
    CGenomeNTdata* pGenome;
    unsigned int uiSeqLengthInWordSize;

    char caSubstring[wordSize * 2 + 1];
    // call getSubstringInBits and transform the info to DNA sequence and store in caSubstring
    char* getSubstring(unsigned int uiPosIndex);
    // get the substring encoded in bits which is shorter than wordSizea.
    char* getSubstring(unsigned int uiPosIndex, unsigned int uiSubstringLength);
    bool fragACGTKmerInBits(CReadInBits& kmerInBits, int startIndex, int kmerLength);
private:
    int initialization(unsigned int uiGenomeSize = 0);
    int encodeJunction(unsigned int chrId);
};
#endif


